import Vue from 'vue'
import Router from 'vue-router'
import pages from '@/pages'

Vue.use(Router)

Vue.nextTick().then(function () {
  console.log(`[Vue] DOM updated by Vue ${Vue.version}`)
})

export default new Router({
  routes: pages.map(({path, name}) => ({path, component: require('@/pages/' + name).default}))
})
